package com.coconet.gas.vo.dw;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "task_report_relate")
public class TaskReportRelate implements Serializable {
    /**
     * 主键id
     */
    @Id
    private Integer id;

    /**
     * 任务id
     */
    @Column(name = "task_id")
    private String taskId;

    /**
     * 报告id
     */
    @Column(name = "report_id")
    private String reportId;

    /**
     * 扫描ip
     */
    private String host;

    /**
     * 报告时间
     */
    @Column(name = "report_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date reportTime;

    private static final long serialVersionUID = 1L;

    /**
     * 获取主键id
     *
     * @return id - 主键id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置主键id
     *
     * @param id 主键id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取任务id
     *
     * @return task_id - 任务id
     */
    public String getTaskId() {
        return taskId;
    }

    /**
     * 设置任务id
     *
     * @param taskId 任务id
     */
    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    /**
     * 获取报告id
     *
     * @return report_id - 报告id
     */
    public String getReportId() {
        return reportId;
    }

    /**
     * 设置报告id
     *
     * @param reportId 报告id
     */
    public void setReportId(String reportId) {
        this.reportId = reportId;
    }

    /**
     * 获取扫描ip
     *
     * @return host - 扫描ip
     */
    public String getHost() {
        return host;
    }

    /**
     * 设置扫描ip
     *
     * @param host 扫描ip
     */
    public void setHost(String host) {
        this.host = host;
    }

    /**
     * 获取报告时间
     *
     * @return report_time - 报告时间
     */
    public Date getReportTime() {
        return reportTime;
    }

    /**
     * 设置报告时间
     *
     * @param reportTime 报告时间
     */
    public void setReportTime(Date reportTime) {
        this.reportTime = reportTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", taskId=").append(taskId);
        sb.append(", reportId=").append(reportId);
        sb.append(", host=").append(host);
        sb.append(", reportTime=").append(reportTime);
        sb.append("]");
        return sb.toString();
    }
}